package com.ycxy.crm.workbench.service.impl;

import com.ycxy.crm.workbench.domain.Activity;
import com.ycxy.crm.workbench.mapper.ActivityMapper;
import com.ycxy.crm.workbench.service.ActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Author jayLuo
 * @Date 2022/9/22 10:46
 * @PackageName:com.ycxy.crm.workbench.service.impl
 * @ClassName: ActivityServiceImpl
 * @Description: TODO
 * @Version 1.0
 */
@Service("activityService")
public class ActivityServiceImpl implements ActivityService {
    @Autowired
    ActivityMapper mapper;

    @Override
    public int saveCreate(Activity activity) {
        return mapper.insertActivity(activity);
    }

    @Override
    public List<Activity> queryActivityByConditionForPage(Map<String, Object> map) {
        return mapper.selectActivityByConditionForPage(map);
    }

    @Override
    public int queryCountOfActivityByCondition(Map<String, Object> map) {
        return mapper.selectCountOfActivityByCondition(map);
    }

    @Override
    public int deleteActivityByIds(String[] ids) {
        return mapper.deleteActivityByIds(ids);
    }

    @Override
    public Activity queryActivityById(String id) {
        return mapper.selectActivityById(id);
    }

    @Override
    public int updateActivityById(Activity activity) {
        return mapper.updateActivityById(activity);
    }

    @Override
    public List<Activity> queryAllActivity() {
        return mapper.selectAllActivity();
    }

    @Override
    public List<Activity> queryActivityByIds(String[] ids) {
        return mapper.selectActivityByIds(ids);
    }

    @Override
    public int saveCreateActivityByList(List<Activity> activityList) {
        return mapper.insertActivityByList(activityList);
    }

    @Override
    public Activity queryActivityForDetailById(String id) {
        return mapper.selectActivityForDetailById(id);
    }

    @Override
    public List<Activity> queryActivityFroDetailByClueId(String clueId) {
        return mapper.selectActivityForDetailByClueId(clueId);
    }

    @Override
    public List<Activity> queryActivityForDetailByNameClueId(Map<String, Object> map) {
        return mapper.selectActivityForDetailByNameClueId(map);
    }

    @Override
    public List<Activity> queryActivityForDetailByIds(String[] ids) {
        return mapper.selectActivityForDetailByIds(ids);
    }

    @Override
    public List<Activity> queryActivityForConvertByNameClueId(Map<String, Object> map) {
        return mapper.selectActivityForConvertByNameClueId(map);
    }
}
